﻿package com.zouloux.core.data
{
	import flash.events.Event;
	import flash.events.IEventDispatcher;
	
	/**
	 * ...
	 * @author ZoulouX
	 */
	public interface IDataCollection extends IEventDispatcher
	{
		function get forceDispatch ():Boolean;
		function set forceDispatch (pValue:Boolean):void;
		
		function get all ():Array;
		function set all (pValue:Array):void;
		
		function get first ():IDataItem;
		function get prev ():IDataItem;
		function get current ():IDataItem;
		function get next ():IDataItem;
		function get last ():IDataItem;
		
		function set loop (pValue:Boolean):void;
		function get loop ():Boolean;
		
		function get length ():uint;
		
		function get index ():uint;
		function set index (pValue:uint):void;
		
		function get isVoid ():Boolean;
		
		function getElement (pIndex:uint):IDataItem;
		function getIndex (pElement:IDataItem):uint;
		
		function add (pElement:IDataItem):void
		function addAt (pElement:IDataItem, pAt:uint):void
		
		function addFromRemote (pData:*, pType:Class):void
		
		function remove (pElement:IDataItem):void
		function removeAt (pIndex:uint):void
		
		function forEach (pHandler:Function):void
		
		function clear ():void
	}
}